import 'package:flutter/material.dart';

class WRow extends StatefulWidget {
  @override
  _WRowState createState() => _WRowState();
}

class _WRowState extends State<WRow> {
  Widget _rowItem(String content) {
    return Container(
      padding: EdgeInsets.all(5),
      child: Text(
        content,
        style: TextStyle(fontWeight: FontWeight.w300, fontSize: 20),
      ),
      decoration: BoxDecoration(
          border: Border.all(color: Colors.black, width: 1),
          borderRadius: BorderRadius.circular(3)),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Row"),
        centerTitle: true,
      ),
      body: ConstrainedBox(
        constraints: BoxConstraints(minWidth: double.infinity),
        child: Column(
          children: <Widget>[
            Row(
              mainAxisAlignment: MainAxisAlignment.start,
              children: <Widget>[
                _rowItem("Row 1"),
                _rowItem("Row 2"),
                _rowItem("Row 3"),
              ],
            ),
            SizedBox(
              height: 10,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              children: <Widget>[
                _rowItem("Row 1"),
                _rowItem("Row 2"),
                _rowItem("Row 3"),
              ],
            ),
            SizedBox(
              height: 10,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                _rowItem("Row 1"),
                _rowItem("Row 2"),
                _rowItem("Row 3"),
              ],
            ),
            SizedBox(
              height: 10,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              children: <Widget>[
                _rowItem("Row 1"),
                _rowItem("Row 2"),
                _rowItem("Row 3"),
              ],
            ),
            SizedBox(
              height: 10,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: <Widget>[
                _rowItem("Row 1"),
                _rowItem("Row 2"),
                _rowItem("Row 3"),
              ],
            ),
            SizedBox(
              height: 10,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                _rowItem("Row 1"),
                _rowItem("Row 2"),
                _rowItem("Row 3"),
              ],
            )
          ],
        ),
      ),
    );
  }
}
